package com.myidis.controller;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.myidis.request.BBReq;
import com.myidis.request.SeasonAdjustReq;
import com.myidis.response.ForecastCompareRes;
import com.myidis.servlet.ForecastServlet;

@Controller
@RequestMapping("/forecast")
public class ForecastController {
	@Autowired
	private ForecastServlet forecastServlet;
	
	@ResponseBody
	@RequestMapping("/network")
	public ArrayList<ArrayList<Double>> forecast(@RequestBody BBReq req) {
		return forecastServlet.forecast(req);
	}
	
	@ResponseBody
	@RequestMapping("/compare")
	public ForecastCompareRes compare(@RequestBody SeasonAdjustReq req) {
		return forecastServlet.compare(req);
	}
}
